<html>
	<head>
		<title></title>
		<!--script type="text/javascript">linquidAuto=true;</script-->
		<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="linquid.min.js"></script>
		<script type="text/javascript" src="testController.js"></script>
		<script type="text/javascript" src="tests/Aggregate.js"></script>
		<script type="text/javascript" src="tests/All.js"></script>
		<script type="text/javascript" src="tests/Any.js"></script>
		<script type="text/javascript" src="tests/Average.js"></script>
		<script type="text/javascript" src="tests/Concat.js"></script>
		<script type="text/javascript" src="tests/Contains.js"></script>
		<script type="text/javascript" src="tests/Count.js"></script>
		<script type="text/javascript" src="tests/DefaultIfEmpty.js"></script>
		<script type="text/javascript" src="tests/Distinct.js"></script>
		<script type="text/javascript" src="tests/Each.js"></script>
		<script type="text/javascript" src="tests/ElementAt.js"></script>
		<script type="text/javascript" src="tests/ElementAtOrDefault.js"></script>
		<script type="text/javascript" src="tests/Except.js"></script>
		<script type="text/javascript" src="tests/First.js"></script>
		<script type="text/javascript" src="tests/FirstOrDefault.js"></script>
		<script type="text/javascript" src="tests/GroupBy.js"></script>
		<script type="text/javascript" src="tests/IndexOf.js"></script>
		<script type="text/javascript" src="tests/Intersect.js"></script>
		<script type="text/javascript" src="tests/Join.js"></script>
		<script type="text/javascript" src="tests/Last.js"></script>
		<script type="text/javascript" src="tests/LastOrDefault.js"></script>
		<script type="text/javascript" src="tests/LongCount.js"></script>
		<script type="text/javascript" src="tests/Max.js"></script>
		<script type="text/javascript" src="tests/Min.js"></script>
		<script type="text/javascript" src="tests/OfType.js"></script>
		<script type="text/javascript" src="tests/OrderBy.js"></script>
		<script type="text/javascript" src="tests/OrderByDescending.js"></script>
		<script type="text/javascript" src="tests/Reverse.js"></script>
		<script type="text/javascript" src="tests/Select.js"></script>
		<script type="text/javascript" src="tests/SelectMany.js"></script>
		<script type="text/javascript" src="tests/SequenceEquals.js"></script>
		<script type="text/javascript" src="tests/Single.js"></script>
		<script type="text/javascript" src="tests/SingleOrDefault.js"></script>
		<script type="text/javascript" src="tests/Skip.js"></script>
		<script type="text/javascript" src="tests/SkipWhile.js"></script>
		<script type="text/javascript" src="tests/Sum.js"></script>
		<script type="text/javascript" src="tests/Take.js"></script>
		<script type="text/javascript" src="tests/TakeWhile.js"></script>
		<script type="text/javascript" src="tests/ToDictionary.js"></script>
		<script type="text/javascript" src="tests/Where.js"></script>
		<script type="text/javascript" src="tests/Union.js"></script>
		<script type="text/javascript" src="tests/Zip.js"></script>
		<style type="text/css">
			#testResults
			{
				min-width: 400px;
				max-width: 600px;
				width:400px;
				list-style: none;
				margin: 0;
				padding: 0;
				border:solid black 1px;
				overflow: auto;
			}
			#testResults li{
				margin:0;
			}
			#methodView{
				display:inline-block;
				position:absolute;
				margin-left:15px;
			}
		</style>
		<script type="text/javascript">
			if(!window["console"]){window["console"] = { log:function(o){} };}
			linq.uify();
			$.fn.extend({
				classes:function(){
					return this.Select(function(x){return x.className.split(" ");}).Aggregate();
				}});

			function formatMessage(message, total, passed, failed) {
				return "<table cellpadding='0' cellspacing='0'><thead><th colspan='2'>" + message + "<" + "/th><" + "/thead><tbody>" 
					 + "<tr style='color:#444;'><td>" + total + "<" + "/td><td>Tests Ran<" + "/td><" + "/tr>"
					 + (passed > 0 ? "<tr style='color:green;'><td>" + passed + "<" + "/td><td>Tests Passed<" + "/td><" + "/tr>" : "")
					 + (failed > 0 ? "<tr style='color:red;'><td>" + failed + "<" + "/td><td>Tests Failed<" + "/td><" + "/tr>" : "") 
					 + "<" + "/tbody><" + "/table>";
			}
			
			$(function(){
				var mv = $("#testResults");
				$(window).scroll(function(){
					$("#methodView").css({
						top:($(window).scrollTop() + mv.offset().top), 
						left:(mv.offset().left + mv.width())
					})
				});

				$("#methodView").css({
					top:(mv.offset().top), 
					left:(mv.offset().left + mv.width())
				})
				
				var body = $("#testResults");
				runAllTests(function(a, b, c, d) {
					var dsrc = (d||b).toString();
					var result = body.append("<li id='" + a + "' title='" + (b || c) + "' style='border:solid 1px transparent; background-color:" + (b?"Red":"LightGreen") + ";'>" + a + "<div style='display:none'>" + (b || "") + "<" +"/div><" + "/li>");
				    result.css({cursor:"pointer"})
				    	.mouseover(function(s){ if(s.target.id != a) return; $(s.target).css({border:"dashed 1px gray"}); $("#methodView").html(dsrc);})
				    	.mouseout(function(s){ if(s.target.id != a) return; $(s.target).css({border:"solid 1px transparent"})});
				},
				function(passed, failed, total){
					$("#testProgress").html(formatMessage("Test run complete", total, passed, failed));
				},
				function(method, testIndex, total, passed, failed){
					$("#testProgress").html(formatMessage("Now running: " + method + " (#" + testIndex + " of " + total + ")", passed + failed, passed, failed));
				});
				
				$("#testResults").mouseout(function(){$("#methodView").html("Roll over a method to view its source")});
			});
		</script>
	</head>
	<body>
		<a id="testProgress">Waiting...</a>
		<ul id="testResults">			
		</ul>
		<span id="methodView">
			Roll over a method to view its source
		</span>
	</body>
</html>